3.1.81 \(\int \frac {\sin (c+d x)}{a+b \sin ^2(c+d x)} \, dx\) [81]

3.1.81.1 Optimal result
3.1.81.2 Mathematica [C] (verified)
3.1.81.3 Rubi [A] (verified)
3.1.81.4 Maple [A] (verified)
3.1.81.5 Fricas [A] (verification not implemented)
3.1.81.6 Sympy [B] (verification not implemented)
3.1.81.7 Maxima [A] (verification not implemented)
3.1.81.8 Giac [A] (verification not implemented)
3.1.81.9 Mupad [B] (verification not implemented)

3.1.81.1 Optimal result

Integrand size = 21, antiderivative size = 37 \[ \int \frac {\sin (c+d x)}{a+b \sin ^2(c+d x)} \, dx=-\frac {\text {arctanh}\left (\frac {\sqrt {b} \cos (c+d x)}{\sqrt {a+b}}\right )}{\sqrt {b} \sqrt {a+b} d} \]

output
-arctanh(cos(d*x+c)*b^(1/2)/(a+b)^(1/2))/d/b^(1/2)/(a+b)^(1/2)
 
3.1.81.2 Mathematica [C] (verified)

Result contains complex when optimal does not.

Time = 0.86 (sec) , antiderivative size = 97, normalized size of antiderivative = 2.62 \[ \int \frac {\sin (c+d x)}{a+b \sin ^2(c+d x)} \, dx=\frac {\arctan \left (\frac {\sqrt {b}-i \sqrt {a} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {-a-b}}\right )+\arctan \left (\frac {\sqrt {b}+i \sqrt {a} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {-a-b}}\right )}{\sqrt {-a-b} \sqrt {b} d} \]

input
Integrate[Sin[c + d*x]/(a + b*Sin[c + d*x]^2),x]
 
output
(ArcTan[(Sqrt[b] - I*Sqrt[a]*Tan[(c + d*x)/2])/Sqrt[-a - b]] + ArcTan[(Sqr 
t[b] + I*Sqrt[a]*Tan[(c + d*x)/2])/Sqrt[-a - b]])/(Sqrt[-a - b]*Sqrt[b]*d)
 
3.1.81.3 Rubi [A] (verified)

Time = 0.21 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3042, 3665, 221}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {\sin (c+d x)}{a+b \sin ^2(c+d x)} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\sin (c+d x)}{a+b \sin (c+d x)^2}dx\)

\(\Big \downarrow \) 3665

\(\displaystyle -\frac {\int \frac {1}{-b \cos ^2(c+d x)+a+b}d\cos (c+d x)}{d}\)

\(\Big \downarrow \) 221

\(\displaystyle -\frac {\text {arctanh}\left (\frac {\sqrt {b} \cos (c+d x)}{\sqrt {a+b}}\right )}{\sqrt {b} d \sqrt {a+b}}\)

input
Int[Sin[c + d*x]/(a + b*Sin[c + d*x]^2),x]
 
output
-(ArcTanh[(Sqrt[b]*Cos[c + d*x])/Sqrt[a + b]]/(Sqrt[b]*Sqrt[a + b]*d))
 

3.1.81.3.1 Defintions of rubi rules used

rule 221
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x 
/Rt[-a/b, 2]], x] /; FreeQ[{a, b}, x] && NegQ[a/b]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3665
Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^ 
(p_.), x_Symbol] :> With[{ff = FreeFactors[Cos[e + f*x], x]}, Simp[-ff/f 
Subst[Int[(1 - ff^2*x^2)^((m - 1)/2)*(a + b - b*ff^2*x^2)^p, x], x, Cos[e + 
 f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[(m - 1)/2]
 
3.1.81.4 Maple [A] (verified)

Time = 0.39 (sec) , antiderivative size = 29, normalized size of antiderivative = 0.78

method result size
derivativedivides \(-\frac {\operatorname {arctanh}\left (\frac {b \cos \left (d x +c \right )}{\sqrt {\left (a +b \right ) b}}\right )}{d \sqrt {\left (a +b \right ) b}}\) \(29\)
default \(-\frac {\operatorname {arctanh}\left (\frac {b \cos \left (d x +c \right )}{\sqrt {\left (a +b \right ) b}}\right )}{d \sqrt {\left (a +b \right ) b}}\) \(29\)
risch \(\frac {i \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {2 i \left (a +b \right ) {\mathrm e}^{i \left (d x +c \right )}}{\sqrt {-a b -b^{2}}}+1\right )}{2 \sqrt {-a b -b^{2}}\, d}-\frac {i \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 i \left (a +b \right ) {\mathrm e}^{i \left (d x +c \right )}}{\sqrt {-a b -b^{2}}}+1\right )}{2 \sqrt {-a b -b^{2}}\, d}\) \(116\)

input
int(sin(d*x+c)/(a+b*sin(d*x+c)^2),x,method=_RETURNVERBOSE)
 
output
-1/d/((a+b)*b)^(1/2)*arctanh(b*cos(d*x+c)/((a+b)*b)^(1/2))
 
3.1.81.5 Fricas [A] (verification not implemented)

Time = 0.28 (sec) , antiderivative size = 117, normalized size of antiderivative = 3.16 \[ \int \frac {\sin (c+d x)}{a+b \sin ^2(c+d x)} \, dx=\left [\frac {\log \left (-\frac {b \cos \left (d x + c\right )^{2} - 2 \, \sqrt {a b + b^{2}} \cos \left (d x + c\right ) + a + b}{b \cos \left (d x + c\right )^{2} - a - b}\right )}{2 \, \sqrt {a b + b^{2}} d}, \frac {\sqrt {-a b - b^{2}} \arctan \left (\frac {\sqrt {-a b - b^{2}} \cos \left (d x + c\right )}{a + b}\right )}{{\left (a b + b^{2}\right )} d}\right ] \]

input
integrate(sin(d*x+c)/(a+b*sin(d*x+c)^2),x, algorithm="fricas")
 
output
[1/2*log(-(b*cos(d*x + c)^2 - 2*sqrt(a*b + b^2)*cos(d*x + c) + a + b)/(b*c 
os(d*x + c)^2 - a - b))/(sqrt(a*b + b^2)*d), sqrt(-a*b - b^2)*arctan(sqrt( 
-a*b - b^2)*cos(d*x + c)/(a + b))/((a*b + b^2)*d)]
 
3.1.81.6 Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 367693 vs. \(2 (34) = 68\).

Time = 76.85 (sec) , antiderivative size = 367693, normalized size of antiderivative = 9937.65 \[ \int \frac {\sin (c+d x)}{a+b \sin ^2(c+d x)} \, dx=\text {Too large to display} \]

input
integrate(sin(d*x+c)/(a+b*sin(d*x+c)**2),x)
 
output
Piecewise((zoo*x/sin(c), Eq(a, 0) & Eq(b, 0) & Eq(d, 0)), (log(tan(c/2 + d 
*x/2))/(b*d), Eq(a, 0)), (2/(b*d*tan(c/2 + d*x/2)**2 - b*d), Eq(a, -b)), ( 
-cos(c + d*x)/(a*d), Eq(b, 0)), (x*sin(c)/(a + b*sin(c)**2), Eq(d, 0)), (7 
4*a**37*b*log(-sqrt(-1 - 2*b/a - 2*sqrt(a*b + b**2)/a) + tan(c/2 + d*x/2)) 
/(2*a**38*b*d + 5478*a**37*b**2*d - 148*a**37*b*d*sqrt(a*b + b**2) + 25025 
32*a**36*b**3*d - 135124*a**36*b**2*d*sqrt(a*b + b**2) + 456961248*a**35*b 
**4*d - 36983424*a**35*b**3*d*sqrt(a*b + b**2) + 44602414272*a**34*b**5*d 
- 4809599808*a**34*b**4*d*sqrt(a*b + b**2) + 2698911348224*a**33*b**6*d - 
363524561920*a**33*b**5*d*sqrt(a*b + b**2) + 110776036340736*a**32*b**7*d 
- 17891931206656*a**32*b**6*d*sqrt(a*b + b**2) + 3275718126403584*a**31*b* 
*8*d - 616808259780608*a**31*b**7*d*sqrt(a*b + b**2) + 72854727629602816*a 
**30*b**9*d - 15666762815766528*a**30*b**8*d*sqrt(a*b + b**2) + 1258467596 
957384704*a**29*b**10*d - 304230303833522176*a**29*b**9*d*sqrt(a*b + b**2) 
 + 17306140891880620032*a**28*b**11*d - 4645206174395269120*a**28*b**10*d* 
sqrt(a*b + b**2) + 193199008739227598848*a**27*b**12*d - 57001938802859573 
248*a**27*b**11*d*sqrt(a*b + b**2) + 1778515685235870400512*a**26*b**13*d 
- 572029907419376123904*a**26*b**12*d*sqrt(a*b + b**2) + 13673782930644613 
988352*a**25*b**14*d - 4761020109769125396480*a**25*b**13*d*sqrt(a*b + b** 
2) + 88722183139577965838336*a**24*b**15*d - 33244276082712682430464*a**24 
*b**14*d*sqrt(a*b + b**2) + 490030319626953299066880*a**23*b**16*d - 19...
 
3.1.81.7 Maxima [A] (verification not implemented)

Time = 0.40 (sec) , antiderivative size = 50, normalized size of antiderivative = 1.35 \[ \int \frac {\sin (c+d x)}{a+b \sin ^2(c+d x)} \, dx=\frac {\log \left (\frac {b \cos \left (d x + c\right ) - \sqrt {{\left (a + b\right )} b}}{b \cos \left (d x + c\right ) + \sqrt {{\left (a + b\right )} b}}\right )}{2 \, \sqrt {{\left (a + b\right )} b} d} \]

input
integrate(sin(d*x+c)/(a+b*sin(d*x+c)^2),x, algorithm="maxima")
 
output
1/2*log((b*cos(d*x + c) - sqrt((a + b)*b))/(b*cos(d*x + c) + sqrt((a + b)* 
b)))/(sqrt((a + b)*b)*d)
 
3.1.81.8 Giac [A] (verification not implemented)

Time = 0.38 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.00 \[ \int \frac {\sin (c+d x)}{a+b \sin ^2(c+d x)} \, dx=\frac {\arctan \left (\frac {b \cos \left (d x + c\right )}{\sqrt {-a b - b^{2}}}\right )}{\sqrt {-a b - b^{2}} d} \]

input
integrate(sin(d*x+c)/(a+b*sin(d*x+c)^2),x, algorithm="giac")
 
output
arctan(b*cos(d*x + c)/sqrt(-a*b - b^2))/(sqrt(-a*b - b^2)*d)
 
3.1.81.9 Mupad [B] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 29, normalized size of antiderivative = 0.78 \[ \int \frac {\sin (c+d x)}{a+b \sin ^2(c+d x)} \, dx=-\frac {\mathrm {atanh}\left (\frac {\sqrt {b}\,\cos \left (c+d\,x\right )}{\sqrt {a+b}}\right )}{\sqrt {b}\,d\,\sqrt {a+b}} \]

input
int(sin(c + d*x)/(a + b*sin(c + d*x)^2),x)
 
output
-atanh((b^(1/2)*cos(c + d*x))/(a + b)^(1/2))/(b^(1/2)*d*(a + b)^(1/2))